/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Business;

import Entity.Etbl_Flights;
import Model.DALtbl_Flights;
import java.util.ArrayList;

/**
 *
 * @author LeThuyLinh
 */
public class Btbl_Flights {
    private DALtbl_Flights _objDAL_Flight=null;
    public Btbl_Flights(){
        _objDAL_Flight=new DALtbl_Flights();
    }
    public boolean Addtbl_Flight(Etbl_Flights objEtbl_Flight){
        return _objDAL_Flight.Addtbl_Flight(objEtbl_Flight);
    }
    public boolean Updatetbl_Flight(Etbl_Flights objEtbl_Flight){
        return _objDAL_Flight.updatetbl_Flight(objEtbl_Flight);
    }
    public boolean Deletetbl_Flight(int flightID){
        if(flightID>0){
        return _objDAL_Flight.deletetbl_Flight(flightID);
        }
        else{
            return false;
        }
    }
    public Etbl_Flights GetOnetbl_Flight(int flightID){
        if(flightID>0)
            return _objDAL_Flight.getFilght(flightID);
        else
            return null;
    }
    public ArrayList GetListFlights(String orderBy, String ASCorDESC, String WhereClause, int PagingIndex, int PagingSize){
        return _objDAL_Flight.getListFlight(orderBy, ASCorDESC, WhereClause, PagingIndex, PagingSize);
    }
}
